<?php


namespace App\Models\System;


use App\Models\BaseModel;


class File extends BaseModel
{
    protected $table = 'system__files';

    protected $fillable = [
        'id',
        'name',
        'module',
        'path',
        'md5',
        'deleted_at',
        'updated_at',
        'created_at',
        'type'
    ];

    /**
     * 评论对象类型
     * @param $key
     * @return mixed
     */
    public function getTypeTextAttribute($key)
    {
        return $this->getCode(self::TYPES, $this->type, '');
    }
}
